package com.fsc.mapper;

import com.fsc.entity.domain.TeacherInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fsc.entity.dto.TeacherDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author 86183
* @description 针对表【teacher_info(老师信息表)】的数据库操作Mapper
* @createDate 2024-06-02 13:15:22
* @Entity com.fsc.domain.TeacherInfo
*/
@Mapper
public interface TeacherInfoMapper extends BaseMapper<TeacherInfo> {
    @Select("SELECT * FROM db01.teacher_info WHERE teacher_id = #{teacherId}")
    TeacherInfo getTeacherById(int teacherId);

    @Update("UPDATE teacher_info " +
            "SET " +
            "gender = #{gender}, " +
            "teacher_name = #{teacherName}, " +
            "subject = #{subject} " +
            "WHERE teacher_id = #{teacherId}")
    void update(TeacherDTO teacherDTO);
}




